<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@ taglib prefix="nested" uri="http://struts.apache.org/tags-nested" %>
<html>
<head>

<title>메세지</title>
<link href="<%=request.getContextPath()%>/common/css/message.css" type="text/css" rel="stylesheet"/>
</head>
<body onload="resizeWindow()">
<table style="width: 350px;vertical-align: top;" cellpadding="0" cellspacing="0">
	<tr>
		<td style="width: 350px;height: 20px;vertical-align: top;">
			<%@ include file="./messagenavi.jsp" %>
		</td>
	</tr>
		<tr>
			<html:form action="/message">
			<td style="vertical-align: top;border: 1px solid #355884;border-top:1px solid #8db1dd;border-left:1px solid #8db1dd;">
				<input type="hidden" name="send" value="<bean:write name="messageForm" property="send"/>"/>	
				<input type="hidden" name="mno" value="<bean:write name="messageForm" property="mno"/>"/>				
				<input type="hidden" name="method" value="getSendForm"/>
				<input type="hidden" name="behold" value="<bean:write name="messageForm" property="behold"/>"/>
				<input type="hidden" name="reply" value="1"/>
				<table style="border: 1px;width: 350px;" cellpadding="0" cellspacing="0">
					<tr><td style="text-align: center;background: #355884;color: white;padding: 4px;">
						보낸사람 : <bean:write name="messageForm" property="send"/>
						<div style="text-align: right;">
						<span style="font-size: 7pt;"><bean:write name="messageForm" property="senddate"/></span></div>
						</td></tr>
					<tr><td style="border :1px solid #8db1dd;padding: 5px;">
						<pre><bean:write name="messageForm" property="message"/></pre>
						</td></tr>
					<tr><td style="text-align: right;background: #8db1dd;padding-right: 5px;">
						<logic:equal value="2" name="messageForm" property="behold">
							<html:link href="javascript: messageForm.submit();" style="color:white;">[답장]</html:link>
							<html:link href="javascript: removeMessage('deleteMessage');" style="color:white;">[삭제]</html:link>
						</logic:equal>
						<logic:notEqual value="2" name="messageForm" property="behold">
							<html:link href="javascript: messageForm.submit();" style="color:white;">[답장]</html:link>
							<html:link href="javascript: holdMessage('saveMessage');" style="color:white;">[보관]</html:link>
							<html:link href="javascript: removeMessage('deleteMessage');" style="color:white;">[삭제]</html:link>
						</logic:notEqual>
						</td></tr>
				</table>
		</td>
			</html:form>
	</tr>
	<tr><td style="text-align: center;text-align: right;padding-right: 5px;">
			<html:link href="javascript: window.close();">[닫기]</html:link></td>
		</td></tr>
</table>
</body>
</html>

<script type="text/javascript">
<!--
	function holdMessage(m){
		var method = document.getElementById('method');
		method.value = m;
		//alert(method.value);
		messageForm.submit();
	}

	function removeMessage(m){
		if(confirm("쪽지를 삭제하시겠습니까?")){
			var method = document.getElementById('method');
			method.value = m;
			//alert(method.value);
			messageForm.submit();	
		}		
	}
//-->
</script>




